<?php
declare (strict_types=1);

namespace app\index\controller;

use app\BaseController;
use app\common\component\WxBase;
use think\App;

class Base extends BaseController
{

    use WxBase;


    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->userId = session('user_id');
//        if ($this->request->host() != 'm.fuqiniu.cn'){
//            exit('未授权的站点');
//        }
        $noController = ['Index'];
        if (!in_array($this->request->controller(), $noController) && $this->userId=='') {
            ajaxError('参数错误');
        }
    }
}
